|
fiberopt
2.0.0.0
|
Functions | |
| void | fiberopt_cfg_setup (fiberopt_cfg_t *cfg) |
| Config Object Initialization function. More... | |
| err_t | fiberopt_init (fiberopt_t *ctx, fiberopt_cfg_t *cfg) |
| Initialization function. More... | |
| err_t | fiberopt_generic_write (fiberopt_t *ctx, uint8_t *data_buf, uint16_t len) |
| Generic write function. More... | |
| err_t | fiberopt_generic_read (fiberopt_t *ctx, uint8_t *data_buf, uint16_t len) |
| Generic read function. More... | |
| void fiberopt_cfg_setup | ( | fiberopt_cfg_t * | cfg | ) |
Config Object Initialization function.
| cfg | Click configuration structure. |
This function initializes Click configuration structure to init state.
| err_t fiberopt_generic_read | ( | fiberopt_t * | ctx, |
| uint8_t * | data_buf, | ||
| uint16_t | len | ||
| ) |
Generic read function.
| ctx | Click object. |
| data_buf | Output data buffer. |
| len | Number of the bytes in data buffer. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. This function reads data. | err_t fiberopt_generic_write | ( | fiberopt_t * | ctx, |
| uint8_t * | data_buf, | ||
| uint16_t | len | ||
| ) |
Generic write function.
| ctx | Click object. |
| data_buf | Input data buffer |
| len | Number of the bytes in the data buffer |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. This function writes data. | err_t fiberopt_init | ( | fiberopt_t * | ctx, |
| fiberopt_cfg_t * | cfg | ||
| ) |
Initialization function.
| ctx | Click object. |
| cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this Click.